#ifndef _POINT_H_
#define _POINT_H_

#include<fstream>
using namespace std;

class Point
{
	int m_x,m_y;

public:
	//c'tor
	Point():m_x(0),m_y(0){};
	Point(int x, int y):m_x(x),m_y(y){};
	//c'tor with file
	Point( ifstream &in_file, bool binary = true);
	void setPoint(int x, int y){m_x = x; m_y = y;}
	void setX(int x){m_x = x;}
	void setY(int y){m_y = y;}
	int getX()const{return m_x;}
	int getY()const{return m_y;}
	void savePoint( ofstream &out_file, bool binary = true);

	friend ostream &operator<<(ostream &out, const Point & point)
	{
		out << point.m_x << " " << point.m_y;
		return out;
	}

	friend istream &operator>>(istream & in ,Point & point)
	{
		in >>point.m_x >> point.m_y;
		return in;
	}
};
#endif